/*
 * Created by JFormDesigner on Wed Jun 19 12:40:54 CST 2024
 */

package com.nirvana;

import com.intellij.openapi.ui.Messages;
import com.nirvana.config.PluginConfig;
import com.nirvana.factory.ItemFactory;
import com.nirvana.generate.InitCodeGenerator;
import com.nirvana.generate.OrmEntityGenerator;
import com.nirvana.item.CommonItem;
import com.nirvana.type.ItemType;
import com.nirvana.ui.FilterFieldEditPanel;
import com.nirvana.ui.TooltipEditPanel;
import com.nirvana.utils.FileUtil;
import com.nirvana.utils.UIUtil;
import net.miginfocom.swing.MigLayout;
import org.jdesktop.swingx.HorizontalLayout;
import org.jdesktop.swingx.VerticalLayout;

import javax.swing.*;
import javax.swing.border.TitledBorder;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;

/**
 * @author zhouqichun
 */
public class MainPanel {
    private ItemType currItemType = ItemType.DefPropertyItem;
    public MainPanel() {
        initComponents();

        CommonItem defPropertyCommonItem = new CommonItem(ItemType.DefPropertyItem, this, defPropertiesPanel, defPropertyItemPanel, defPropertyRadioButton, propertyNameTextField, defClassNameTextField);
        CommonItem resolvePropertyCommonItem = new CommonItem(ItemType.ResolvePropertyItem, this, resolveMethodPropertiesPanel, resolveMethodPropertyPanel, resolveRadioButton, fullClassNameTextField, null);
        CommonItem tableFieldCommonItem = new CommonItem(ItemType.TableFieldItem, this, ormTableFieldItemsPanel, ormTableFieldItemTemplatePanel, tableFieldRadioButton, tableFieldNameTextField, ormEntityClassNameTextField);
        ItemFactory.registerCommonItem(defPropertyCommonItem);
        ItemFactory.registerCommonItem(resolvePropertyCommonItem);
        ItemFactory.registerCommonItem(tableFieldCommonItem);

        PluginConfig.getInstance().afterInit(this);
        TooltipEditPanel.getInstance().init(this);
        FilterFieldEditPanel.getInstance().init(this);
        setScrollPanelIncrement();
        switchPanel(new ActionEvent(configGenerateButton, 0, ""));
    }

    private void setScrollPanelIncrement() {
        int unit = 20;
        configGeneratePanel.getVerticalScrollBar().setUnitIncrement(unit);
        ormLeftScrollPanel.getVerticalScrollBar().setUnitIncrement(unit);
        ormRightScrollPanel.getVerticalScrollBar().setUnitIncrement(unit);
        settingScrollPanel.getVerticalScrollBar().setUnitIncrement(unit);
    }

    private void switchPanel(ActionEvent e) {
        Object source = e.getSource();
        boolean openConfig = source == configGenerateButton;
        configGeneratePanel.setVisible(openConfig);
        clearAllPropertyButton.setVisible(openConfig);
        if (openConfig) {
            currItemType = ItemType.DefPropertyItem;
        }

        boolean openOrm = source == entityGenerateButton;
        ormGeneratePanel.setVisible(openOrm);
        addButton.setVisible(!openOrm);
        deleteButton.setVisible(!openOrm);
        copyButton.setVisible(!openOrm);
        moveUpButton.setVisible(!openOrm);
        moveDownButton.setVisible(!openOrm);
        if (openOrm) {
            currItemType = ItemType.TableFieldItem;
        }

        boolean openSetting = source == settingButton;
        settingScrollPanel.setVisible(openSetting);
        filterFieldButton.setVisible(openSetting);
        if (openSetting) {
            currItemType = ItemType.ResolvePropertyItem;
        }

        tooltipEditPanel.setVisible(false);
        if (source != settingButton) {
            ItemFactory.getCommonItem(ItemType.ResolvePropertyItem).saveResolve();
        } else {
            SwingUtilities.invokeLater(() -> ItemFactory.getCommonItem(ItemType.ResolvePropertyItem).refresh());
        }
        UIUtil.refresh(mainPanel);
    }

    public JPanel getMainPanel() {
        return mainPanel;
    }

    private void add(ActionEvent e) {
        ItemFactory.getCommonItem(currItemType).add(false);
    }

    private void refresh(ActionEvent e) {
        CommonItem commonItem = ItemFactory.getCommonItem(currItemType);
        commonItem.refresh();
        UIUtil.refresh(commonItem.parent);
    }

    private void delete(ActionEvent e) {
        ItemFactory.getCommonItem(currItemType).delete();
    }

    private void copy(ActionEvent e) {
        ItemFactory.getCommonItem(currItemType).copy();
    }

    private void moveUp(ActionEvent e) {
        ItemFactory.getCommonItem(currItemType).moveUp();
    }

    private void moveDown(ActionEvent e) {
        ItemFactory.getCommonItem(currItemType).moveDown();
    }

    private void selectFile(ActionEvent e) {
        String[] acceptSuffix;
        String dir;
        Object source = e.getSource();
        if (source == xmlSelectButton) {
            acceptSuffix = new String[]{".xml"};
            dir = xmlFilePathTextField.getText();
        } else if (source == excelSelectButton) {
            acceptSuffix = new String[]{".xlsm", ".xlsx"};
            dir = excelFilePathTextField.getText();
        } else if(source == defSelectButton) {
            acceptSuffix = new String[]{".scala"};
            dir = PluginConfig.getInstance().defBasePath();
/*
        } else if(source == fbsSelectButton) {
            acceptSuffix = new String[]{".fbs"};
            dir = PluginConfig.getInstance().fbsBasePath();
*/
        }else {
            acceptSuffix = new String[]{""};
            dir = "";
        }
        FileUtil.chooseFile(configGeneratePanel, fileNameTextField, defClassNameTextField, acceptSuffix, dir);
    }

    private void mainPanelComponentResized(ComponentEvent e) {
        refresh(null);
    }

    private void generateDef(ActionEvent e) {
        ItemFactory.getCommonItem(ItemType.DefPropertyItem).generateDefFile();
    }

    private void generateCode(ActionEvent e) {
        InitCodeGenerator instance = InitCodeGenerator.getInstance();
        instance.generate();
    }

    private void copyCode(ActionEvent e) {
        initCodeTextField.setSelectionStart(0);
        initCodeTextField.setSelectionEnd(initCodeTextField.getText().length());
        initCodeTextField.copy();
        Messages.showInfoMessage("已复制到剪贴板", "提示信息");
    }

    private void filterField(ActionEvent e) {
        FilterFieldEditPanel.getInstance().open();
    }

    private void reloadPlugin(ActionEvent e) {
        PluginConfig.getInstance().reloadPlugin();
        UIUtil.refresh(mainPanel);
        Messages.showInfoMessage("插件重载成功", "提示信息");
        refresh(null);
    }

    private void clearAllProperty(ActionEvent e) {
        initCodeTextField.setText("");
        ItemFactory.getCommonItem(ItemType.DefPropertyItem).clearAll();
    }

    private void ormConnectDb(ActionEvent e) {
        OrmEntityGenerator.getInstance().connect();
    }

    private void ormGeneratePanelComponentShown(ComponentEvent e) {
        ormDbUrlTextField.setText(dbUrlTextField.getText());
    }

    private void ormGeneratePanelComponentHidden(ComponentEvent e) {
        filterTableTextField.setText("");
        OrmEntityGenerator.getInstance().clear();
    }

    private void ormGenerate(ActionEvent e) {
        OrmEntityGenerator.getInstance().generate();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        mainPanel = new JPanel();
        leftButtonPanel = new JPanel();
        switchButtonPanel = new JPanel();
        configGenerateButton = new JToggleButton();
        entityGenerateButton = new JToggleButton();
        settingButton = new JButton();
        reloadPluginButton = new JButton();
        abilityButtonPanel = new JPanel();
        addButton = new JButton();
        deleteButton = new JButton();
        copyButton = new JButton();
        refreshButton = new JButton();
        moveUpButton = new JButton();
        moveDownButton = new JButton();
        filterFieldButton = new JButton();
        clearAllPropertyButton = new JButton();
        configGeneratePanel = new JScrollPane();
        contentPanel = new JPanel();
        selectPanel = new JPanel();
        fileNameTextField = new JTextField();
        xmlSelectButton = new JButton();
        excelSelectButton = new JButton();
        defSelectButton = new JButton();
        defGeneratePanel = new JPanel();
        propertyNoticeLabel = new JLabel();
        defPropertiesTitlePanel = new JPanel();
        propertyNameLabel = new JLabel();
        label17 = new JLabel();
        commentLabel = new JLabel();
        propertyTypeLabel = new JLabel();
        propertyResolveLabel = new JLabel();
        defPropertiesPanel = new JPanel();
        defPropertyItemPanel = new JPanel();
        defPropertyRadioButton = new JRadioButton();
        propertyNameTextField = new JTextField();
        textField2 = new JTextField();
        commentTextField = new JTextField();
        propertyTypeComboBox = new JComboBox<>();
        propertyResolveComboBox = new JComboBox<>();
        label1 = new JLabel();
        defPropertiesGenerateConfigPanel = new JPanel();
        extendsGroupDefDefCheckBox = new JCheckBox();
        rebuildCommonFbsCheckBox = new JCheckBox();
        useFlatBuffersCheckBox = new JCheckBox();
        skipDefGenerateCheckBox = new JCheckBox();
        defPropertyBottomButtonPanel = new JPanel();
        defClassNameLabel = new JLabel();
        defClassNameTextField = new JTextField();
        generateDefButton = new JButton();
        initCodeGeneratePanel = new JPanel();
        initCodeButtonPanel = new JPanel();
        copyCodeButton = new JButton();
        generateCodeButton = new JButton();
        initCodeScrollPane = new JScrollPane();
        initCodeTextField = new JTextArea();
        ormGeneratePanel = new JPanel();
        ormTopPanel = new JPanel();
        ormDbUrlTextField = new JTextField();
        ormConnectDbButton = new JButton();
        ormReconnectNoticeLabel = new JLabel();
        ormContentPanel = new JPanel();
        filterTableLabel = new JLabel();
        filterTableTextField = new JTextField();
        ormLeftScrollPanel = new JScrollPane();
        ormTablesPanel = new JPanel();
        button1 = new JButton();
        ormRightScrollPanel = new JScrollPane();
        ormRightPanel = new JPanel();
        ormTableFieldsPanel = new JPanel();
        ormRefreshNoticeLabel = new JLabel();
        ormTableFieldsTitlePanel = new JPanel();
        ormTableFieldNameLabel = new JLabel();
        ormTableFieldCommentLabel = new JLabel();
        ormTableFieldTypeLabel = new JLabel();
        label3 = new JLabel();
        ormTableFieldItemsPanel = new JPanel();
        ormTableFieldItemTemplatePanel = new JPanel();
        tableFieldRadioButton = new JRadioButton();
        tableFieldNameTextField = new JTextField();
        tableFieldCommentTextField = new JTextField();
        tableFieldTypeComboBox = new JTextField();
        textField1 = new JTextField();
        ormGenerateNotice = new JLabel();
        ormTableFieldsBottomPanel = new JPanel();
        ormEntityClassNameLabel = new JLabel();
        ormEntityClassNameTextField = new JTextField();
        ormGenerateButton = new JButton();
        ormContentOptionPanel = new JPanel();
        ormFullParamConstructRadioButton = new JRadioButton();
        ormAutoIncrementAddRadioButton = new JRadioButton();
        separator3 = new JSeparator();
        ormBusinessGetEntityByKeyRadioButton = new JRadioButton();
        ormBusinessUpdateEntityRadioButton = new JRadioButton();
        separator1 = new JSeparator();
        ormBusinessGetEntitiesByKeyRadioButton = new JRadioButton();
        ormBusinessUpdateEntitiesBatchRadioButton = new JRadioButton();
        separator2 = new JSeparator();
        ormBusinessSkipOverrideRadioButton = new JRadioButton();
        settingScrollPanel = new JScrollPane();
        settingContentPanel = new JPanel();
        configGenerateSettingPanel = new JPanel();
        configPathPanel = new JPanel();
        xmlPathLabel = new JLabel();
        xmlFilePathTextField = new JTextField();
        excelPathLabel = new JLabel();
        excelFilePathTextField = new JTextField();
        flatBuffersInstallPathLabel = new JLabel();
        flatBuffersInstallPathTextField = new JTextField();
        resolveMethodContainerPanel = new JPanel();
        resolveNoticeLabel = new JLabel();
        resolveMethodTitlePanel = new JPanel();
        fullClassNameLabel = new JLabel();
        resolveMethodLabel = new JLabel();
        resolveParamComboBoxTypeLabel = new JLabel();
        label2 = new JLabel();
        tooltipLabel = new JLabel();
        resolveMethodPropertiesPanel = new JPanel();
        resolveMethodPropertyPanel = new JPanel();
        resolveRadioButton = new JRadioButton();
        fullClassNameTextField = new JTextField();
        resolveMethodTextField = new JTextField();
        resolveParamTypeComboBox = new JComboBox<>();
        showCheckBox = new JCheckBox();
        resolveTooltipButton = new JButton();
        ormGenerateSettingPanel = new JPanel();
        dbInfoPanel = new JPanel();
        dbDriverLabel = new JLabel();
        dbDriverTextField = new JTextField();
        dbUrlLabel = new JLabel();
        dbUrlTextField = new JTextField();
        dbUserLabel = new JLabel();
        dbUserTextField = new JTextField();
        dbPasswordLabel = new JLabel();
        dbPasswordTextField = new JTextField();
        entityInfoPanel = new JPanel();
        entityPackageLabel = new JLabel();
        entityPackageTextField = new JTextField();
        daoPackageLabel = new JLabel();
        daoPackageTextField = new JTextField();
        daoImplPackageLabel = new JLabel();
        daoImplPackageTextField = new JTextField();
        factoryPackageLabel = new JLabel();
        factoryPackageTextField = new JTextField();
        businessPackageLabel = new JLabel();
        businessPackageTextField = new JTextField();
        tooltipEditPanel = new JPanel();
        tooltipEditScrollPanel = new JScrollPane();
        tooltipTextArea = new JTextArea();
        bottomButtonPanel = new JPanel();
        tooltipCancelButton = new JButton();
        tooltipSaveButton = new JButton();
        filterFieldEditPanel = new JPanel();
        filterFieldEditScrollPanel = new JScrollPane();
        filterFieldTextArea = new JTextArea();
        filterFieldBottomButtonPanel = new JPanel();
        filterFieldCancelButton = new JButton();
        filterFieldSaveButton = new JButton();

        //======== mainPanel ========
        {
            mainPanel.setPreferredSize(new Dimension(800, 536));
            mainPanel.setBackground(new Color(0x3a3d4c));
            mainPanel.addComponentListener(new ComponentAdapter() {
                @Override
                public void componentResized(ComponentEvent e) {
                    mainPanelComponentResized(e);
                }
            });
            mainPanel.setLayout(new MigLayout(
                "fill,hidemode 3",
                // columns
                "[112,shrink 0,fill]" +
                "[550,grow,fill]",
                // rows
                "[529,grow,fill]0"));

            //======== leftButtonPanel ========
            {
                leftButtonPanel.setLayout(new VerticalLayout());

                //======== switchButtonPanel ========
                {
                    switchButtonPanel.setBorder(new TitledBorder("\u5207\u6362\u83dc\u5355"));
                    switchButtonPanel.setLayout(new VerticalLayout());

                    //---- configGenerateButton ----
                    configGenerateButton.setText("\u914d\u7f6e\u751f\u6210");
                    configGenerateButton.setSelected(true);
                    configGenerateButton.addActionListener(e -> switchPanel(e));
                    switchButtonPanel.add(configGenerateButton);

                    //---- entityGenerateButton ----
                    entityGenerateButton.setText("\u5b9e\u4f53\u7c7b\u751f\u6210");
                    entityGenerateButton.addActionListener(e -> switchPanel(e));
                    switchButtonPanel.add(entityGenerateButton);

                    //---- settingButton ----
                    settingButton.setText("\u63d2\u4ef6\u8bbe\u7f6e");
                    settingButton.addActionListener(e -> switchPanel(e));
                    switchButtonPanel.add(settingButton);

                    //---- reloadPluginButton ----
                    reloadPluginButton.setText("\u91cd\u8f7d\u63d2\u4ef6");
                    reloadPluginButton.addActionListener(e -> reloadPlugin(e));
                    switchButtonPanel.add(reloadPluginButton);
                }
                leftButtonPanel.add(switchButtonPanel);

                //======== abilityButtonPanel ========
                {
                    abilityButtonPanel.setBorder(new TitledBorder("\u529f\u80fd\u6309\u94ae"));
                    abilityButtonPanel.setLayout(new VerticalLayout());

                    //---- addButton ----
                    addButton.setText("\u65b0\u589e");
                    addButton.addActionListener(e -> add(e));
                    abilityButtonPanel.add(addButton);

                    //---- deleteButton ----
                    deleteButton.setText("\u5220\u9664");
                    deleteButton.addActionListener(e -> delete(e));
                    abilityButtonPanel.add(deleteButton);

                    //---- copyButton ----
                    copyButton.setText("\u590d\u5236");
                    copyButton.addActionListener(e -> copy(e));
                    abilityButtonPanel.add(copyButton);

                    //---- refreshButton ----
                    refreshButton.setText("\u5237\u65b0");
                    refreshButton.addActionListener(e -> refresh(e));
                    abilityButtonPanel.add(refreshButton);

                    //---- moveUpButton ----
                    moveUpButton.setText("\u4e0a\u79fb");
                    moveUpButton.addActionListener(e -> moveUp(e));
                    abilityButtonPanel.add(moveUpButton);

                    //---- moveDownButton ----
                    moveDownButton.setText("\u4e0b\u79fb");
                    moveDownButton.addActionListener(e -> moveDown(e));
                    abilityButtonPanel.add(moveDownButton);

                    //---- filterFieldButton ----
                    filterFieldButton.setText("\u8fc7\u6ee4\u5b57\u6bb5");
                    filterFieldButton.addActionListener(e -> filterField(e));
                    abilityButtonPanel.add(filterFieldButton);

                    //---- clearAllPropertyButton ----
                    clearAllPropertyButton.setText("\u6e05\u7a7a");
                    clearAllPropertyButton.addActionListener(e -> clearAllProperty(e));
                    abilityButtonPanel.add(clearAllPropertyButton);
                }
                leftButtonPanel.add(abilityButtonPanel);
            }
            mainPanel.add(leftButtonPanel, "cell 0 0,aligny top,growy 0");

            //======== configGeneratePanel ========
            {
                configGeneratePanel.setViewportBorder(null);
                configGeneratePanel.setBorder(null);

                //======== contentPanel ========
                {
                    contentPanel.setLayout(new VerticalLayout());

                    //======== selectPanel ========
                    {
                        selectPanel.setBorder(new TitledBorder("\u9009\u62e9\u6587\u4ef6"));
                        selectPanel.setLayout(new MigLayout(
                            "insets 0,hidemode 3,aligny top,gap 0 0",
                            // columns
                            "[347,grow 1,fill]" +
                            "[fill]" +
                            "[fill]" +
                            "[89,fill]",
                            // rows
                            "[grow 1,fill]"));

                        //---- fileNameTextField ----
                        fileNameTextField.setText("\u9009\u62e9 xml/excel/Def\u6587\u4ef6\uff08\u53ef\u9009\uff09");
                        fileNameTextField.setHorizontalAlignment(SwingConstants.CENTER);
                        fileNameTextField.setEditable(false);
                        selectPanel.add(fileNameTextField, "pad 0,cell 0 0,dock center,gapx 0 0,gapy 0 0");

                        //---- xmlSelectButton ----
                        xmlSelectButton.setText("Xml");
                        xmlSelectButton.addActionListener(e -> selectFile(e));
                        selectPanel.add(xmlSelectButton, "cell 1 0");

                        //---- excelSelectButton ----
                        excelSelectButton.setText("Excel");
                        excelSelectButton.addActionListener(e -> selectFile(e));
                        selectPanel.add(excelSelectButton, "cell 2 0");

                        //---- defSelectButton ----
                        defSelectButton.setText("Def");
                        defSelectButton.addActionListener(e -> selectFile(e));
                        selectPanel.add(defSelectButton, "cell 3 0");
                    }
                    contentPanel.add(selectPanel);

                    //======== defGeneratePanel ========
                    {
                        defGeneratePanel.setBorder(new TitledBorder("\u914d\u7f6eDef\u751f\u6210"));
                        defGeneratePanel.setLayout(new MigLayout(
                            "insets 0,hidemode 3",
                            // columns
                            "[737,grow,left]",
                            // rows
                            "[]" +
                            "[]" +
                            "[]" +
                            "[center]" +
                            "[]" +
                            "[]"));

                        //---- propertyNoticeLabel ----
                        propertyNoticeLabel.setText("\u5982\u679c\u65b0\u589e\u7684\u5c5e\u6027\u884c\u51fa\u73b0\u7f3a\u5931\u6216\u663e\u793a\u5f02\u5e38\uff0c\u8bf7\u624b\u52a8\u70b9\u51fb\u5237\u65b0\uff01\uff01\uff01");
                        propertyNoticeLabel.setForeground(new Color(0xff3333));
                        defGeneratePanel.add(propertyNoticeLabel, "cell 0 0");

                        //======== defPropertiesTitlePanel ========
                        {
                            defPropertiesTitlePanel.setLayout(new MigLayout(
                                "fillx,insets 0,hidemode 3,gap 0 0",
                                // columns
                                "[28,fill]" +
                                "[97,grow,fill]" +
                                "[105,grow,fill]" +
                                "[118,grow,fill]" +
                                "[142,grow,fill]" +
                                "[164,grow,fill]",
                                // rows
                                "[grow,center]"));

                            //---- propertyNameLabel ----
                            propertyNameLabel.setText("\u5b57\u6bb5\u540d\u79f0");
                            propertyNameLabel.setHorizontalAlignment(SwingConstants.CENTER);
                            defPropertiesTitlePanel.add(propertyNameLabel, "cell 1 0,growx");

                            //---- label17 ----
                            label17.setText("\u6e90\u5b57\u6bb5");
                            label17.setHorizontalAlignment(SwingConstants.CENTER);
                            defPropertiesTitlePanel.add(label17, "cell 2 0,growx");

                            //---- commentLabel ----
                            commentLabel.setText("\u6ce8\u91ca");
                            commentLabel.setHorizontalAlignment(SwingConstants.CENTER);
                            defPropertiesTitlePanel.add(commentLabel, "cell 3 0,growx");

                            //---- propertyTypeLabel ----
                            propertyTypeLabel.setText("\u5b57\u6bb5\u7c7b\u578b");
                            propertyTypeLabel.setHorizontalAlignment(SwingConstants.CENTER);
                            defPropertiesTitlePanel.add(propertyTypeLabel, "cell 4 0,growx");

                            //---- propertyResolveLabel ----
                            propertyResolveLabel.setText("\u89e3\u6790\u65b9\u5f0f");
                            propertyResolveLabel.setHorizontalAlignment(SwingConstants.CENTER);
                            defPropertiesTitlePanel.add(propertyResolveLabel, "cell 5 0,growx");
                        }
                        defGeneratePanel.add(defPropertiesTitlePanel, "cell 0 1,growx");

                        //======== defPropertiesPanel ========
                        {
                            defPropertiesPanel.setLayout(new VerticalLayout());

                            //======== defPropertyItemPanel ========
                            {
                                defPropertyItemPanel.setBackground(new Color(0x666666));
                                defPropertyItemPanel.setLayout(new MigLayout(
                                    "fillx,hidemode 3",
                                    // columns
                                    "[10,shrink 0,left]0" +
                                    "[115,grow,fill]0" +
                                    "[124,grow,fill]0" +
                                    "[141,grow,fill]0" +
                                    "[158,grow,fill]0" +
                                    "[177,grow,fill]",
                                    // rows
                                    "[]"));

                                //---- defPropertyRadioButton ----
                                defPropertyRadioButton.setHorizontalAlignment(SwingConstants.LEFT);
                                defPropertyItemPanel.add(defPropertyRadioButton, "cell 0 0");

                                //---- propertyNameTextField ----
                                propertyNameTextField.setText("propertyName");
                                defPropertyItemPanel.add(propertyNameTextField, "cell 1 0,growx");
                                defPropertyItemPanel.add(textField2, "cell 2 0");
                                defPropertyItemPanel.add(commentTextField, "cell 3 0");

                                //---- propertyTypeComboBox ----
                                propertyTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
                                    "Int",
                                    "Long",
                                    "Double",
                                    "Float",
                                    "GiveItem",
                                    "BaseAttr"
                                }));
                                defPropertyItemPanel.add(propertyTypeComboBox, "cell 4 0,growx");

                                //---- propertyResolveComboBox ----
                                propertyResolveComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
                                    "strToBaseAttr",
                                    "strToList"
                                }));
                                defPropertyItemPanel.add(propertyResolveComboBox, "cell 5 0,growx");
                            }
                            defPropertiesPanel.add(defPropertyItemPanel);
                        }
                        defGeneratePanel.add(defPropertiesPanel, "cell 0 2,growx");

                        //---- label1 ----
                        label1.setText("\u6ce8\u610f\uff1a\u7c7b\u5185\u975e\u63d2\u4ef6\u751f\u6210\u5185\u5bb9\u91cd\u65b0\u751f\u6210\u5c06\u88ab\u8986\u76d6\uff0c\u91cd\u65b0\u751f\u6210\u524d\u8bf7\u5907\u4efd\u975e\u63d2\u4ef6\u751f\u6210\u5185\u5bb9");
                        label1.setForeground(new Color(0x33ff00));
                        defGeneratePanel.add(label1, "cell 0 3");

                        //======== defPropertiesGenerateConfigPanel ========
                        {
                            defPropertiesGenerateConfigPanel.setBorder(new TitledBorder("\u751f\u6210\u8bbe\u7f6e"));
                            defPropertiesGenerateConfigPanel.setLayout(new MigLayout(
                                "fillx,hidemode 3,align center center",
                                // columns
                                "[fill]",
                                // rows
                                "[]" +
                                "[]" +
                                "[]" +
                                "[]"));

                            //---- extendsGroupDefDefCheckBox ----
                            extendsGroupDefDefCheckBox.setText("\u662f\u5426\u7ee7\u627fGroupDef");
                            defPropertiesGenerateConfigPanel.add(extendsGroupDefDefCheckBox, "cell 0 0");

                            //---- rebuildCommonFbsCheckBox ----
                            rebuildCommonFbsCheckBox.setText("\u662f\u5426\u91cd\u65b0\u751f\u6210common.fbs\u914d\u7f6e");
                            defPropertiesGenerateConfigPanel.add(rebuildCommonFbsCheckBox, "cell 0 1");

                            //---- useFlatBuffersCheckBox ----
                            useFlatBuffersCheckBox.setText("\u662f\u5426\u751f\u6210flatbuffers\u914d\u7f6e");
                            defPropertiesGenerateConfigPanel.add(useFlatBuffersCheckBox, "cell 0 2");

                            //---- skipDefGenerateCheckBox ----
                            skipDefGenerateCheckBox.setText("\u662f\u5426\u8df3\u8fc7Def\u751f\u6210");
                            defPropertiesGenerateConfigPanel.add(skipDefGenerateCheckBox, "cell 0 3");
                        }
                        defGeneratePanel.add(defPropertiesGenerateConfigPanel, "cell 0 4,growx");

                        //======== defPropertyBottomButtonPanel ========
                        {
                            defPropertyBottomButtonPanel.setLayout(new MigLayout(
                                "fillx,insets 0,hidemode 3",
                                // columns
                                "[78,shrink 0,left]" +
                                "[425,grow,fill]" +
                                "[81,shrink 0,right]",
                                // rows
                                "[center]"));

                            //---- defClassNameLabel ----
                            defClassNameLabel.setText("\u914d\u7f6e\u7c7b\u540d");
                            defClassNameLabel.setHorizontalAlignment(SwingConstants.CENTER);
                            defPropertyBottomButtonPanel.add(defClassNameLabel, "cell 0 0,alignx center,growx 0");

                            //---- defClassNameTextField ----
                            defClassNameTextField.setText("XXXDef");
                            defPropertyBottomButtonPanel.add(defClassNameTextField, "cell 1 0,growx");

                            //---- generateDefButton ----
                            generateDefButton.setText("\u751f\u6210Def");
                            generateDefButton.addActionListener(e -> generateDef(e));
                            defPropertyBottomButtonPanel.add(generateDefButton, "cell 2 0,growx");
                        }
                        defGeneratePanel.add(defPropertyBottomButtonPanel, "cell 0 5,growx");
                    }
                    contentPanel.add(defGeneratePanel);

                    //======== initCodeGeneratePanel ========
                    {
                        initCodeGeneratePanel.setBorder(new TitledBorder("\u52a0\u8f7d\u4ee3\u7801\u751f\u6210"));
                        initCodeGeneratePanel.setLayout(new MigLayout(
                            "insets 0,hidemode 3,gap 0 0",
                            // columns
                            "[grow,left]",
                            // rows
                            "[fill]" +
                            "[169,grow,fill]"));

                        //======== initCodeButtonPanel ========
                        {
                            initCodeButtonPanel.setLayout(new HorizontalLayout());

                            //---- copyCodeButton ----
                            copyCodeButton.setText("\u590d\u5236\u4ee3\u7801");
                            copyCodeButton.addActionListener(e -> copyCode(e));
                            initCodeButtonPanel.add(copyCodeButton);

                            //---- generateCodeButton ----
                            generateCodeButton.setText("\u751f\u6210\u4ee3\u7801");
                            generateCodeButton.addActionListener(e -> generateCode(e));
                            initCodeButtonPanel.add(generateCodeButton);
                        }
                        initCodeGeneratePanel.add(initCodeButtonPanel, "cell 0 0,alignx trailing,growx 0");

                        //======== initCodeScrollPane ========
                        {

                            //---- initCodeTextField ----
                            initCodeTextField.setText("loadXXX\u4ee3\u7801\u751f\u6210\u533a\u57df");
                            initCodeTextField.setFont(new Font(Font.MONOSPACED, Font.BOLD, 14));
                            initCodeScrollPane.setViewportView(initCodeTextField);
                        }
                        initCodeGeneratePanel.add(initCodeScrollPane, "cell 0 1,growx");
                    }
                    contentPanel.add(initCodeGeneratePanel);
                }
                configGeneratePanel.setViewportView(contentPanel);
            }
            mainPanel.add(configGeneratePanel, "cell 1 0,dock center");

            //======== ormGeneratePanel ========
            {
                ormGeneratePanel.setVisible(false);
                ormGeneratePanel.addComponentListener(new ComponentAdapter() {
                    @Override
                    public void componentHidden(ComponentEvent e) {
                        ormGeneratePanelComponentHidden(e);
                    }
                    @Override
                    public void componentShown(ComponentEvent e) {
                        ormGeneratePanelComponentShown(e);
                    }
                });
                ormGeneratePanel.setLayout(new MigLayout(
                    "fill,hidemode 3,aligny top",
                    // columns
                    "[fill]",
                    // rows
                    "[35]" +
                    "[grow]"));

                //======== ormTopPanel ========
                {
                    ormTopPanel.setBorder(new TitledBorder("\u8fde\u63a5\u6570\u636e\u5e93"));
                    ormTopPanel.setLayout(new MigLayout(
                        "insets 0,hidemode 3,gap 0 0",
                        // columns
                        "[grow,fill]" +
                        "[shrink 0,fill]",
                        // rows
                        "[grow,center]" +
                        "[]"));
                    ormTopPanel.add(ormDbUrlTextField, "cell 0 0");

                    //---- ormConnectDbButton ----
                    ormConnectDbButton.setText("\u8fde\u63a5");
                    ormConnectDbButton.addActionListener(e -> ormConnectDb(e));
                    ormTopPanel.add(ormConnectDbButton, "cell 1 0");

                    //---- ormReconnectNoticeLabel ----
                    ormReconnectNoticeLabel.setText("\u5982\u679c\u6570\u636e\u5e93\u8868\u7ed3\u6784\u53d1\u751f\u53d8\u5316\uff0c\u53ef\u4ee5\u91cd\u65b0\u70b9\u51fb\u8fde\u63a5\u8fdb\u884c\u5237\u65b0");
                    ormReconnectNoticeLabel.setForeground(new Color(0x33cc00));
                    ormTopPanel.add(ormReconnectNoticeLabel, "cell 0 1");
                }
                ormGeneratePanel.add(ormTopPanel, "cell 0 0");

                //======== ormContentPanel ========
                {
                    ormContentPanel.setBorder(null);
                    ormContentPanel.setLayout(new MigLayout(
                        "hidemode 3",
                        // columns
                        "[:150:250,grow,shrink 0,fill]0" +
                        "[621,grow,shrink 0,fill]",
                        // rows
                        "[]" +
                        "[grow,fill]"));

                    //---- filterTableLabel ----
                    filterTableLabel.setText("\u8fc7\u6ee4\u8868\u540d\uff1a");
                    ormContentPanel.add(filterTableLabel, "cell 0 0 2 1,alignx left,growx 0");
                    ormContentPanel.add(filterTableTextField, "cell 0 0 2 1");

                    //======== ormLeftScrollPanel ========
                    {
                        ormLeftScrollPanel.setBorder(null);

                        //======== ormTablesPanel ========
                        {
                            ormTablesPanel.setBorder(new TitledBorder(null, "\u6570\u636e\u5e93\u8868", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION));
                            ormTablesPanel.setLayout(new VerticalLayout());

                            //---- button1 ----
                            button1.setText("text");
                            ormTablesPanel.add(button1);
                        }
                        ormLeftScrollPanel.setViewportView(ormTablesPanel);
                    }
                    ormContentPanel.add(ormLeftScrollPanel, "pad 0,cell 0 1,dock center,gapx 0 0");

                    //======== ormRightScrollPanel ========
                    {
                        ormRightScrollPanel.setBorder(null);

                        //======== ormRightPanel ========
                        {
                            ormRightPanel.setBorder(new TitledBorder(null, "\u751f\u6210\u533a\u57df", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION));
                            ormRightPanel.setLayout(new MigLayout(
                                "hidemode 3",
                                // columns
                                "[grow,fill]",
                                // rows
                                "[35]" +
                                "[]"));

                            //======== ormTableFieldsPanel ========
                            {
                                ormTableFieldsPanel.setBorder(new TitledBorder("\u8868\u7ed3\u6784"));
                                ormTableFieldsPanel.setLayout(new VerticalLayout());

                                //---- ormRefreshNoticeLabel ----
                                ormRefreshNoticeLabel.setForeground(new Color(0xff3333));
                                ormRefreshNoticeLabel.setText("\u5982\u679c\u663e\u793a\u5f02\u5e38\u8bf7\u624b\u52a8\u5237\u65b0\uff01");
                                ormTableFieldsPanel.add(ormRefreshNoticeLabel);

                                //======== ormTableFieldsTitlePanel ========
                                {
                                    ormTableFieldsTitlePanel.setLayout(new MigLayout(
                                        "hidemode 3",
                                        // columns
                                        "[13,fill]0" +
                                        "[136,shrink 0,fill]0" +
                                        "[141,fill]0" +
                                        "[156,fill]0" +
                                        "[67,grow,fill]",
                                        // rows
                                        "[]"));

                                    //---- ormTableFieldNameLabel ----
                                    ormTableFieldNameLabel.setText("\u5b57\u6bb5\u540d");
                                    ormTableFieldNameLabel.setLabelFor(tableFieldNameTextField);
                                    ormTableFieldNameLabel.setHorizontalAlignment(SwingConstants.CENTER);
                                    ormTableFieldsTitlePanel.add(ormTableFieldNameLabel, "cell 1 0");

                                    //---- ormTableFieldCommentLabel ----
                                    ormTableFieldCommentLabel.setText("Sql\u7c7b\u578b");
                                    ormTableFieldCommentLabel.setLabelFor(tableFieldCommentTextField);
                                    ormTableFieldCommentLabel.setHorizontalAlignment(SwingConstants.CENTER);
                                    ormTableFieldsTitlePanel.add(ormTableFieldCommentLabel, "cell 2 0");

                                    //---- ormTableFieldTypeLabel ----
                                    ormTableFieldTypeLabel.setText("Java\u7c7b\u578b");
                                    ormTableFieldTypeLabel.setLabelFor(tableFieldTypeComboBox);
                                    ormTableFieldTypeLabel.setHorizontalAlignment(SwingConstants.CENTER);
                                    ormTableFieldsTitlePanel.add(ormTableFieldTypeLabel, "cell 3 0");

                                    //---- label3 ----
                                    label3.setText("\u6ce8\u91ca");
                                    label3.setHorizontalAlignment(SwingConstants.CENTER);
                                    ormTableFieldsTitlePanel.add(label3, "cell 4 0");
                                }
                                ormTableFieldsPanel.add(ormTableFieldsTitlePanel);

                                //======== ormTableFieldItemsPanel ========
                                {
                                    ormTableFieldItemsPanel.setLayout(new VerticalLayout());

                                    //======== ormTableFieldItemTemplatePanel ========
                                    {
                                        ormTableFieldItemTemplatePanel.setLayout(new MigLayout(
                                            "insets 0,hidemode 3,gap 0 0",
                                            // columns
                                            "[shrink 0,fill]" +
                                            "[137,fill]" +
                                            "[143,fill]" +
                                            "[151,fill]" +
                                            "[80,grow,fill]",
                                            // rows
                                            "[grow,center]"));
                                        ormTableFieldItemTemplatePanel.add(tableFieldRadioButton, "cell 0 0");

                                        //---- tableFieldNameTextField ----
                                        tableFieldNameTextField.setEditable(false);
                                        ormTableFieldItemTemplatePanel.add(tableFieldNameTextField, "cell 1 0");

                                        //---- tableFieldCommentTextField ----
                                        tableFieldCommentTextField.setEditable(false);
                                        ormTableFieldItemTemplatePanel.add(tableFieldCommentTextField, "cell 2 0");

                                        //---- tableFieldTypeComboBox ----
                                        tableFieldTypeComboBox.setEditable(false);
                                        ormTableFieldItemTemplatePanel.add(tableFieldTypeComboBox, "cell 3 0");
                                        ormTableFieldItemTemplatePanel.add(textField1, "cell 4 0");
                                    }
                                    ormTableFieldItemsPanel.add(ormTableFieldItemTemplatePanel);
                                }
                                ormTableFieldsPanel.add(ormTableFieldItemsPanel);

                                //---- ormGenerateNotice ----
                                ormGenerateNotice.setText("\u6ce8\u610f\uff1a\u4ee3\u7801\u751f\u6210\u4f1a\u8986\u76d6\u65e7\u7684\u5185\u5bb9");
                                ormGenerateNotice.setForeground(new Color(0x00cc00));
                                ormTableFieldsPanel.add(ormGenerateNotice);

                                //======== ormTableFieldsBottomPanel ========
                                {
                                    ormTableFieldsBottomPanel.setLayout(new MigLayout(
                                        "hidemode 3",
                                        // columns
                                        "[fill]" +
                                        "[grow,fill]" +
                                        "[fill]",
                                        // rows
                                        "[]"));

                                    //---- ormEntityClassNameLabel ----
                                    ormEntityClassNameLabel.setText("\u5b9e\u4f53\u7c7b\u540d");
                                    ormTableFieldsBottomPanel.add(ormEntityClassNameLabel, "cell 0 0");

                                    //---- ormEntityClassNameTextField ----
                                    ormEntityClassNameTextField.setEditable(false);
                                    ormTableFieldsBottomPanel.add(ormEntityClassNameTextField, "cell 1 0");

                                    //---- ormGenerateButton ----
                                    ormGenerateButton.setText("\u751f\u6210DAO");
                                    ormGenerateButton.addActionListener(e -> ormGenerate(e));
                                    ormTableFieldsBottomPanel.add(ormGenerateButton, "cell 2 0");
                                }
                                ormTableFieldsPanel.add(ormTableFieldsBottomPanel);
                            }
                            ormRightPanel.add(ormTableFieldsPanel, "cell 0 0");

                            //======== ormContentOptionPanel ========
                            {
                                ormContentOptionPanel.setBorder(new TitledBorder("\u53ef\u9009\u9879"));
                                ormContentOptionPanel.setLayout(new VerticalLayout());

                                //---- ormFullParamConstructRadioButton ----
                                ormFullParamConstructRadioButton.setText("\u5b9e\u4f53\u7c7b\u751f\u6210\u5168\u53c2\u6784\u9020\u51fd\u6570");
                                ormFullParamConstructRadioButton.setSelected(true);
                                ormContentOptionPanel.add(ormFullParamConstructRadioButton);

                                //---- ormAutoIncrementAddRadioButton ----
                                ormAutoIncrementAddRadioButton.setText("DaoImpl\u751f\u6210AutoIncrement\u7684add\u65b9\u6cd5");
                                ormAutoIncrementAddRadioButton.setToolTipText("\u8bbe\u7f6e\u4e86auto increment\u7684\u4e3b\u952e\u5c06\u4f1a\u81ea\u52a8\u8bbe\u7f6e");
                                ormContentOptionPanel.add(ormAutoIncrementAddRadioButton);
                                ormContentOptionPanel.add(separator3);

                                //---- ormBusinessGetEntityByKeyRadioButton ----
                                ormBusinessGetEntityByKeyRadioButton.setText("Business\u751f\u6210getEntityByKeys\u65b9\u6cd5");
                                ormBusinessGetEntityByKeyRadioButton.setSelected(true);
                                ormContentOptionPanel.add(ormBusinessGetEntityByKeyRadioButton);

                                //---- ormBusinessUpdateEntityRadioButton ----
                                ormBusinessUpdateEntityRadioButton.setText("Business\u751f\u6210updateEntity\u65b9\u6cd5");
                                ormBusinessUpdateEntityRadioButton.setSelected(true);
                                ormContentOptionPanel.add(ormBusinessUpdateEntityRadioButton);
                                ormContentOptionPanel.add(separator1);

                                //---- ormBusinessGetEntitiesByKeyRadioButton ----
                                ormBusinessGetEntitiesByKeyRadioButton.setText("Business\u751f\u6210getEntityListByFirstPrimaryKey\u65b9\u6cd5");
                                ormBusinessGetEntitiesByKeyRadioButton.setSelected(true);
                                ormContentOptionPanel.add(ormBusinessGetEntitiesByKeyRadioButton);

                                //---- ormBusinessUpdateEntitiesBatchRadioButton ----
                                ormBusinessUpdateEntitiesBatchRadioButton.setText("Business\u751f\u6210updateEntitiesBatch\u65b9\u6cd5");
                                ormBusinessUpdateEntitiesBatchRadioButton.setSelected(true);
                                ormContentOptionPanel.add(ormBusinessUpdateEntitiesBatchRadioButton);
                                ormContentOptionPanel.add(separator2);

                                //---- ormBusinessSkipOverrideRadioButton ----
                                ormBusinessSkipOverrideRadioButton.setText("\u8df3\u8fc7\u8986\u76d6Business\u4ee3\u7801");
                                ormBusinessSkipOverrideRadioButton.setVisible(false);
                                ormContentOptionPanel.add(ormBusinessSkipOverrideRadioButton);
                            }
                            ormRightPanel.add(ormContentOptionPanel, "cell 0 1");
                        }
                        ormRightScrollPanel.setViewportView(ormRightPanel);
                    }
                    ormContentPanel.add(ormRightScrollPanel, "cell 1 1");
                }
                ormGeneratePanel.add(ormContentPanel, "cell 0 1,growy");
            }
            mainPanel.add(ormGeneratePanel, "cell 1 0");

            //======== settingScrollPanel ========
            {
                settingScrollPanel.setVisible(false);

                //======== settingContentPanel ========
                {
                    settingContentPanel.setLayout(new VerticalLayout());

                    //======== configGenerateSettingPanel ========
                    {
                        configGenerateSettingPanel.setBorder(new TitledBorder("\u914d\u7f6e\u751f\u6210\u8bbe\u7f6e"));
                        configGenerateSettingPanel.setLayout(new VerticalLayout());

                        //======== configPathPanel ========
                        {
                            configPathPanel.setLayout(new MigLayout(
                                "fill,hidemode 3",
                                // columns
                                "[126,shrink 0,fill]" +
                                "[589,grow,fill]",
                                // rows
                                "[20,grow,fill]" +
                                "[]" +
                                "[]"));

                            //---- xmlPathLabel ----
                            xmlPathLabel.setText("Xml\u6587\u4ef6\u8def\u5f84");
                            configPathPanel.add(xmlPathLabel, "cell 0 0,alignx label,growx 0");

                            //---- xmlFilePathTextField ----
                            xmlFilePathTextField.setText("D:\\Project\\Projects\\srsc_server2\\mtj_config\\xml");
                            configPathPanel.add(xmlFilePathTextField, "cell 1 0");

                            //---- excelPathLabel ----
                            excelPathLabel.setText("Excel\u6587\u4ef6\u8def\u5f84");
                            configPathPanel.add(excelPathLabel, "cell 0 1,alignx label,growx 0");

                            //---- excelFilePathTextField ----
                            excelFilePathTextField.setText("D:\\\u914d\u7f6e");
                            configPathPanel.add(excelFilePathTextField, "cell 1 1");

                            //---- flatBuffersInstallPathLabel ----
                            flatBuffersInstallPathLabel.setText("flatc.exe\u5b89\u88c5\u8def\u5f84");
                            configPathPanel.add(flatBuffersInstallPathLabel, "cell 0 2,alignx label,growx 0");

                            //---- flatBuffersInstallPathTextField ----
                            flatBuffersInstallPathTextField.setText("G:\\flatbuffers");
                            configPathPanel.add(flatBuffersInstallPathTextField, "cell 1 2");
                        }
                        configGenerateSettingPanel.add(configPathPanel);

                        //======== resolveMethodContainerPanel ========
                        {
                            resolveMethodContainerPanel.setBorder(new TitledBorder(null, "\u89e3\u6790\u4fe1\u606f", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION));
                            resolveMethodContainerPanel.setLayout(new VerticalLayout());

                            //---- resolveNoticeLabel ----
                            resolveNoticeLabel.setText("\u5982\u679c\u65b0\u589e\u7684\u5c5e\u6027\u884c\u51fa\u73b0\u7f3a\u5931\u6216\u663e\u793a\u5f02\u5e38\uff0c\u8bf7\u624b\u52a8\u70b9\u51fb\u5237\u65b0\uff01\uff01\uff01");
                            resolveNoticeLabel.setForeground(new Color(0xff3333));
                            resolveMethodContainerPanel.add(resolveNoticeLabel);

                            //======== resolveMethodTitlePanel ========
                            {
                                resolveMethodTitlePanel.setLayout(new MigLayout(
                                    "fillx,insets 0,hidemode 3,gap 0 0",
                                    // columns
                                    "[20,fill]" +
                                    "[212,grow,shrink 0,fill]" +
                                    "[188,grow,fill]" +
                                    "[100,grow,shrink 0,fill]" +
                                    "[49,grow,fill]" +
                                    "[76,fill]",
                                    // rows
                                    "[fill]"));

                                //---- fullClassNameLabel ----
                                fullClassNameLabel.setText("\u7c7b\u5168\u9650\u540d");
                                fullClassNameLabel.setHorizontalAlignment(SwingConstants.CENTER);
                                resolveMethodTitlePanel.add(fullClassNameLabel, "cell 1 0");

                                //---- resolveMethodLabel ----
                                resolveMethodLabel.setText("\u89e3\u6790\u65b9\u5f0f");
                                resolveMethodLabel.setHorizontalAlignment(SwingConstants.CENTER);
                                resolveMethodTitlePanel.add(resolveMethodLabel, "cell 2 0");

                                //---- resolveParamComboBoxTypeLabel ----
                                resolveParamComboBoxTypeLabel.setText("\u5165\u53c2\u7c7b\u578b");
                                resolveParamComboBoxTypeLabel.setHorizontalAlignment(SwingConstants.CENTER);
                                resolveMethodTitlePanel.add(resolveParamComboBoxTypeLabel, "cell 3 0");

                                //---- label2 ----
                                label2.setText("\u662f\u5426\u663e\u793a");
                                label2.setHorizontalAlignment(SwingConstants.CENTER);
                                resolveMethodTitlePanel.add(label2, "cell 4 0");

                                //---- tooltipLabel ----
                                tooltipLabel.setText("\u5e2e\u52a9\u4fe1\u606f");
                                tooltipLabel.setHorizontalAlignment(SwingConstants.CENTER);
                                resolveMethodTitlePanel.add(tooltipLabel, "cell 5 0");
                            }
                            resolveMethodContainerPanel.add(resolveMethodTitlePanel);

                            //======== resolveMethodPropertiesPanel ========
                            {
                                resolveMethodPropertiesPanel.setLayout(new VerticalLayout());

                                //======== resolveMethodPropertyPanel ========
                                {
                                    resolveMethodPropertyPanel.setBackground(new Color(0x666666));
                                    resolveMethodPropertyPanel.setLayout(new MigLayout(
                                        "fillx,insets 0,hidemode 3,gap 0 0",
                                        // columns
                                        "[20,shrink 0,fill]" +
                                        "[193,grow,shrink 0,fill]" +
                                        "[169,grow,fill]" +
                                        "[84,grow,shrink 0,fill]" +
                                        "[39,grow,shrink 0,fill]" +
                                        "[39,shrink 0,fill]",
                                        // rows
                                        "[fill]"));
                                    resolveMethodPropertyPanel.add(resolveRadioButton, "cell 0 0");
                                    resolveMethodPropertyPanel.add(fullClassNameTextField, "cell 1 0");
                                    resolveMethodPropertyPanel.add(resolveMethodTextField, "cell 2 0");

                                    //---- resolveParamTypeComboBox ----
                                    resolveParamTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
                                        "String",
                                        "MapBean"
                                    }));
                                    resolveMethodPropertyPanel.add(resolveParamTypeComboBox, "cell 3 0,growx");

                                    //---- showCheckBox ----
                                    showCheckBox.setSelected(true);
                                    showCheckBox.setHorizontalAlignment(SwingConstants.CENTER);
                                    resolveMethodPropertyPanel.add(showCheckBox, "cell 4 0,growx");

                                    //---- resolveTooltipButton ----
                                    resolveTooltipButton.setText("...");
                                    resolveTooltipButton.setFont(new Font("JetBrains Mono Medium", Font.PLAIN, 10));
                                    resolveMethodPropertyPanel.add(resolveTooltipButton, "cell 5 0");
                                }
                                resolveMethodPropertiesPanel.add(resolveMethodPropertyPanel);
                            }
                            resolveMethodContainerPanel.add(resolveMethodPropertiesPanel);
                        }
                        configGenerateSettingPanel.add(resolveMethodContainerPanel);
                    }
                    settingContentPanel.add(configGenerateSettingPanel);

                    //======== ormGenerateSettingPanel ========
                    {
                        ormGenerateSettingPanel.setBorder(new TitledBorder("\u5b9e\u4f53\u7c7b\u751f\u6210\u8bbe\u7f6e"));
                        ormGenerateSettingPanel.setLayout(new MigLayout(
                            "fill,hidemode 3",
                            // columns
                            "[fill]",
                            // rows
                            "[29,grow,fill]" +
                            "[]"));

                        //======== dbInfoPanel ========
                        {
                            dbInfoPanel.setBorder(new TitledBorder(null, "\u6570\u636e\u5e93\u4fe1\u606f", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION));
                            dbInfoPanel.setLayout(new MigLayout(
                                "fill,hidemode 3",
                                // columns
                                "[118,shrink 0,fill]0" +
                                "[grow,fill]",
                                // rows
                                "[29,grow,fill]" +
                                "[]" +
                                "[]" +
                                "[]"));

                            //---- dbDriverLabel ----
                            dbDriverLabel.setText("\u6570\u636e\u5e93\u9a71\u52a8");
                            dbInfoPanel.add(dbDriverLabel, "cell 0 0");

                            //---- dbDriverTextField ----
                            dbDriverTextField.setText("com.mysql.cj.jdbc.Driver");
                            dbInfoPanel.add(dbDriverTextField, "cell 1 0");

                            //---- dbUrlLabel ----
                            dbUrlLabel.setText("\u6570\u636e\u5e93\u8fde\u63a5");
                            dbInfoPanel.add(dbUrlLabel, "cell 0 1");

                            //---- dbUrlTextField ----
                            dbUrlTextField.setText("jdbc:mysql://localhost:3306/mtj_1123");
                            dbInfoPanel.add(dbUrlTextField, "cell 1 1");

                            //---- dbUserLabel ----
                            dbUserLabel.setText("\u7528\u6237\u540d");
                            dbInfoPanel.add(dbUserLabel, "cell 0 2");

                            //---- dbUserTextField ----
                            dbUserTextField.setText("root");
                            dbInfoPanel.add(dbUserTextField, "cell 1 2");

                            //---- dbPasswordLabel ----
                            dbPasswordLabel.setText("\u5bc6\u7801");
                            dbInfoPanel.add(dbPasswordLabel, "cell 0 3");

                            //---- dbPasswordTextField ----
                            dbPasswordTextField.setText("123456");
                            dbInfoPanel.add(dbPasswordTextField, "cell 1 3");
                        }
                        ormGenerateSettingPanel.add(dbInfoPanel, "cell 0 0");

                        //======== entityInfoPanel ========
                        {
                            entityInfoPanel.setBorder(new TitledBorder(null, "\u751f\u6210\u8def\u5f84\u4fe1\u606f", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION));
                            entityInfoPanel.setLayout(new MigLayout(
                                "fill,hidemode 3",
                                // columns
                                "[94,shrink 0,fill]0" +
                                "[grow,shrink 0,fill]",
                                // rows
                                "[]" +
                                "[]" +
                                "[]" +
                                "[]" +
                                "[]"));

                            //---- entityPackageLabel ----
                            entityPackageLabel.setText("\u5b9e\u4f53\u7c7b\u8def\u5f84");
                            entityInfoPanel.add(entityPackageLabel, "cell 0 0,alignx label,growx 0");

                            //---- entityPackageTextField ----
                            entityPackageTextField.setText("com.nirvana.data.entity");
                            entityInfoPanel.add(entityPackageTextField, "cell 1 0");

                            //---- daoPackageLabel ----
                            daoPackageLabel.setText("DAO\u63a5\u53e3\u8def\u5f84");
                            entityInfoPanel.add(daoPackageLabel, "cell 0 1,alignx label,growx 0");

                            //---- daoPackageTextField ----
                            daoPackageTextField.setText("com.nirvana.data.dao");
                            entityInfoPanel.add(daoPackageTextField, "cell 1 1");

                            //---- daoImplPackageLabel ----
                            daoImplPackageLabel.setText("DAO\u5b9e\u73b0\u8def\u5f84");
                            entityInfoPanel.add(daoImplPackageLabel, "cell 0 2,alignx label,growx 0");

                            //---- daoImplPackageTextField ----
                            daoImplPackageTextField.setText("com.nirvana.data.dao.impl");
                            entityInfoPanel.add(daoImplPackageTextField, "cell 1 2");

                            //---- factoryPackageLabel ----
                            factoryPackageLabel.setText("\u5de5\u5382\u7c7b\u8def\u5f84");
                            entityInfoPanel.add(factoryPackageLabel, "cell 0 3,alignx label,growx 0");

                            //---- factoryPackageTextField ----
                            factoryPackageTextField.setText("com.nirvana.data.factory");
                            entityInfoPanel.add(factoryPackageTextField, "cell 1 3");

                            //---- businessPackageLabel ----
                            businessPackageLabel.setText("Bussiness\u7c7b\u8def\u5f84");
                            entityInfoPanel.add(businessPackageLabel, "cell 0 4,alignx label,growx 0");

                            //---- businessPackageTextField ----
                            businessPackageTextField.setText("com.nirvana.data.bussiness");
                            entityInfoPanel.add(businessPackageTextField, "cell 1 4");
                        }
                        ormGenerateSettingPanel.add(entityInfoPanel, "cell 0 1");
                    }
                    settingContentPanel.add(ormGenerateSettingPanel);
                }
                settingScrollPanel.setViewportView(settingContentPanel);
            }
            mainPanel.add(settingScrollPanel, "cell 1 0");

            //======== tooltipEditPanel ========
            {
                tooltipEditPanel.setVisible(false);
                tooltipEditPanel.setLayout(new MigLayout(
                    "fill,hidemode 3",
                    // columns
                    "[550,grow,fill]",
                    // rows
                    "[529,grow,fill]0" +
                    "[]" +
                    "[]"));

                //======== tooltipEditScrollPanel ========
                {

                    //---- tooltipTextArea ----
                    tooltipTextArea.setTabSize(4);
                    tooltipTextArea.setColumns(20);
                    tooltipTextArea.setRows(20);
                    tooltipTextArea.setLineWrap(true);
                    tooltipEditScrollPanel.setViewportView(tooltipTextArea);
                }
                tooltipEditPanel.add(tooltipEditScrollPanel, "cell 0 0");

                //======== bottomButtonPanel ========
                {
                    bottomButtonPanel.setLayout(new HorizontalLayout());

                    //---- tooltipCancelButton ----
                    tooltipCancelButton.setText("\u53d6\u6d88");
                    bottomButtonPanel.add(tooltipCancelButton);

                    //---- tooltipSaveButton ----
                    tooltipSaveButton.setText("\u4fdd\u5b58");
                    bottomButtonPanel.add(tooltipSaveButton);
                }
                tooltipEditPanel.add(bottomButtonPanel, "cell 0 1,alignx trailing,growx 0");
            }
            mainPanel.add(tooltipEditPanel, "cell 1 0");

            //======== filterFieldEditPanel ========
            {
                filterFieldEditPanel.setVisible(false);
                filterFieldEditPanel.setLayout(new MigLayout(
                    "fill,hidemode 3",
                    // columns
                    "[550,grow,fill]",
                    // rows
                    "[529,grow,fill]0" +
                    "[]" +
                    "[]"));

                //======== filterFieldEditScrollPanel ========
                {

                    //---- filterFieldTextArea ----
                    filterFieldTextArea.setTabSize(4);
                    filterFieldTextArea.setColumns(20);
                    filterFieldTextArea.setRows(20);
                    filterFieldTextArea.setLineWrap(true);
                    filterFieldEditScrollPanel.setViewportView(filterFieldTextArea);
                }
                filterFieldEditPanel.add(filterFieldEditScrollPanel, "cell 0 0");

                //======== filterFieldBottomButtonPanel ========
                {
                    filterFieldBottomButtonPanel.setLayout(new HorizontalLayout());

                    //---- filterFieldCancelButton ----
                    filterFieldCancelButton.setText("\u53d6\u6d88");
                    filterFieldBottomButtonPanel.add(filterFieldCancelButton);

                    //---- filterFieldSaveButton ----
                    filterFieldSaveButton.setText("\u4fdd\u5b58");
                    filterFieldBottomButtonPanel.add(filterFieldSaveButton);
                }
                filterFieldEditPanel.add(filterFieldBottomButtonPanel, "cell 0 1,alignx trailing,growx 0");
            }
            mainPanel.add(filterFieldEditPanel, "cell 1 0");
        }
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    public JPanel mainPanel;
    public JPanel leftButtonPanel;
    public JPanel switchButtonPanel;
    public JToggleButton configGenerateButton;
    public JToggleButton entityGenerateButton;
    public JButton settingButton;
    public JButton reloadPluginButton;
    public JPanel abilityButtonPanel;
    public JButton addButton;
    public JButton deleteButton;
    public JButton copyButton;
    public JButton refreshButton;
    public JButton moveUpButton;
    public JButton moveDownButton;
    public JButton filterFieldButton;
    public JButton clearAllPropertyButton;
    public JScrollPane configGeneratePanel;
    public JPanel contentPanel;
    public JPanel selectPanel;
    public JTextField fileNameTextField;
    public JButton xmlSelectButton;
    public JButton excelSelectButton;
    public JButton defSelectButton;
    public JPanel defGeneratePanel;
    public JLabel propertyNoticeLabel;
    public JPanel defPropertiesTitlePanel;
    public JLabel propertyNameLabel;
    public JLabel label17;
    public JLabel commentLabel;
    public JLabel propertyTypeLabel;
    public JLabel propertyResolveLabel;
    public JPanel defPropertiesPanel;
    public JPanel defPropertyItemPanel;
    public JRadioButton defPropertyRadioButton;
    public JTextField propertyNameTextField;
    public JTextField textField2;
    public JTextField commentTextField;
    public JComboBox<String> propertyTypeComboBox;
    public JComboBox<String> propertyResolveComboBox;
    public JLabel label1;
    public JPanel defPropertiesGenerateConfigPanel;
    public JCheckBox extendsGroupDefDefCheckBox;
    public JCheckBox rebuildCommonFbsCheckBox;
    public JCheckBox useFlatBuffersCheckBox;
    public JCheckBox skipDefGenerateCheckBox;
    public JPanel defPropertyBottomButtonPanel;
    public JLabel defClassNameLabel;
    public JTextField defClassNameTextField;
    public JButton generateDefButton;
    public JPanel initCodeGeneratePanel;
    public JPanel initCodeButtonPanel;
    public JButton copyCodeButton;
    public JButton generateCodeButton;
    public JScrollPane initCodeScrollPane;
    public JTextArea initCodeTextField;
    public JPanel ormGeneratePanel;
    public JPanel ormTopPanel;
    public JTextField ormDbUrlTextField;
    public JButton ormConnectDbButton;
    public JLabel ormReconnectNoticeLabel;
    public JPanel ormContentPanel;
    public JLabel filterTableLabel;
    public JTextField filterTableTextField;
    public JScrollPane ormLeftScrollPanel;
    public JPanel ormTablesPanel;
    public JButton button1;
    public JScrollPane ormRightScrollPanel;
    public JPanel ormRightPanel;
    public JPanel ormTableFieldsPanel;
    public JLabel ormRefreshNoticeLabel;
    public JPanel ormTableFieldsTitlePanel;
    public JLabel ormTableFieldNameLabel;
    public JLabel ormTableFieldCommentLabel;
    public JLabel ormTableFieldTypeLabel;
    public JLabel label3;
    public JPanel ormTableFieldItemsPanel;
    public JPanel ormTableFieldItemTemplatePanel;
    public JRadioButton tableFieldRadioButton;
    public JTextField tableFieldNameTextField;
    public JTextField tableFieldCommentTextField;
    public JTextField tableFieldTypeComboBox;
    public JTextField textField1;
    public JLabel ormGenerateNotice;
    public JPanel ormTableFieldsBottomPanel;
    public JLabel ormEntityClassNameLabel;
    public JTextField ormEntityClassNameTextField;
    public JButton ormGenerateButton;
    public JPanel ormContentOptionPanel;
    public JRadioButton ormFullParamConstructRadioButton;
    public JRadioButton ormAutoIncrementAddRadioButton;
    public JSeparator separator3;
    public JRadioButton ormBusinessGetEntityByKeyRadioButton;
    public JRadioButton ormBusinessUpdateEntityRadioButton;
    public JSeparator separator1;
    public JRadioButton ormBusinessGetEntitiesByKeyRadioButton;
    public JRadioButton ormBusinessUpdateEntitiesBatchRadioButton;
    public JSeparator separator2;
    public JRadioButton ormBusinessSkipOverrideRadioButton;
    public JScrollPane settingScrollPanel;
    public JPanel settingContentPanel;
    public JPanel configGenerateSettingPanel;
    public JPanel configPathPanel;
    public JLabel xmlPathLabel;
    public JTextField xmlFilePathTextField;
    public JLabel excelPathLabel;
    public JTextField excelFilePathTextField;
    public JLabel flatBuffersInstallPathLabel;
    public JTextField flatBuffersInstallPathTextField;
    public JPanel resolveMethodContainerPanel;
    public JLabel resolveNoticeLabel;
    public JPanel resolveMethodTitlePanel;
    public JLabel fullClassNameLabel;
    public JLabel resolveMethodLabel;
    public JLabel resolveParamComboBoxTypeLabel;
    public JLabel label2;
    public JLabel tooltipLabel;
    public JPanel resolveMethodPropertiesPanel;
    public JPanel resolveMethodPropertyPanel;
    public JRadioButton resolveRadioButton;
    public JTextField fullClassNameTextField;
    public JTextField resolveMethodTextField;
    public JComboBox<String> resolveParamTypeComboBox;
    public JCheckBox showCheckBox;
    public JButton resolveTooltipButton;
    public JPanel ormGenerateSettingPanel;
    public JPanel dbInfoPanel;
    public JLabel dbDriverLabel;
    public JTextField dbDriverTextField;
    public JLabel dbUrlLabel;
    public JTextField dbUrlTextField;
    public JLabel dbUserLabel;
    public JTextField dbUserTextField;
    public JLabel dbPasswordLabel;
    public JTextField dbPasswordTextField;
    public JPanel entityInfoPanel;
    public JLabel entityPackageLabel;
    public JTextField entityPackageTextField;
    public JLabel daoPackageLabel;
    public JTextField daoPackageTextField;
    public JLabel daoImplPackageLabel;
    public JTextField daoImplPackageTextField;
    public JLabel factoryPackageLabel;
    public JTextField factoryPackageTextField;
    public JLabel businessPackageLabel;
    public JTextField businessPackageTextField;
    public JPanel tooltipEditPanel;
    public JScrollPane tooltipEditScrollPanel;
    public JTextArea tooltipTextArea;
    public JPanel bottomButtonPanel;
    public JButton tooltipCancelButton;
    public JButton tooltipSaveButton;
    public JPanel filterFieldEditPanel;
    public JScrollPane filterFieldEditScrollPanel;
    public JTextArea filterFieldTextArea;
    public JPanel filterFieldBottomButtonPanel;
    public JButton filterFieldCancelButton;
    public JButton filterFieldSaveButton;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
